﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="action_Team_News.aspx.cs" Inherits="action_Team_News" %>
<%@ Import Namespace="Net.Ntalent.Action50.Core.Util"%>
<%@ Import Namespace="Net.Ntalent.Action50.DataAccess"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<!--下拉框所用文件S-->
<script type="text/javascript" src="js/navList.js"></script>
<!--下拉框所用文件E-->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Action_Team_Logs</title>
<link type="text/css" rel="stylesheet" href="css/common.css" />
<link type="text/css" rel="stylesheet" href="css/action.css" />
<script type="text/javascript" src="js/jquery.js"></script>

<script  type="text/javascript" language="javascript">
    function updateCheckCode() {
        setTimeout(function() {
            document.getElementById("Image_Validate").src = "Handlers/CheckCodeHandler.ashx?action=getImage&id=" + Math.random();
        }, 100);
    }

    function updatePage() {
        if (xmlHttp.readyState == 4) {
            var response = xmlHttp.responseText;
            document.getElementById("zipCode").value = response;
        }
    }

    function validate() {
        var checkTex = document.getElementById("Text_CheckCode");
        var checkCodeMessage = document.getElementById("<%=Label_checkCodeMessage.ClientID %>");
        if (checkTex.value == "") {
            checkCodeMessage.innerHTML = "Check code is required";
            document.getElementById("span_info").style.display = "none";
            return false;
        } else {
            return true;
        }  
    }

    function checkCode() {
        var checkTex = document.getElementById("Text_CheckCode");
        var errMessage = document.getElementById("<%=Label_checkCodeMessage.ClientID %>");
        errMessage.innerHTML = "";
        $.get("Handlers/CheckCodeHandler.ashx", { action: "check", iputCheckCode: checkTex.value },
        function(data) {
            if (data == "true") {
                var errMessage = document.getElementById("<%=Label_checkCodeMessage.ClientID %>");
                errMessage.innerHTML = "";
                return true;
            } else {
                var errMessage = document.getElementById("<%=Label_checkCodeMessage.ClientID %>");
                errMessage.innerHTML = "Check code error";
                document.getElementById("span_info").style.display = "none";
                return false;
            }
        }
        );
    }


    function invokeClick(element) {
        if (element.click) element.click();
        else if (element.fireEvent) element.fireEvent('onclick');
        else if (document.createEvent) {
            var evt = document.createEvent("MouseEvents"); evt.initEvent("click", true, true);
            element.dispatchEvent(evt);
        }
    }

</script>
<!--Enter完成提交S-->
<script type="text/javascript">
    function OnText1Key(e) {
        e = e || event;
        
        if (e.keyCode == 13) {
        
            document.getElementById("LinkButton_LeaveWords").focus();
            var a = document.getElementById("LinkButton_LeaveWords");
            invokeClick(a);
        }
    }
</script>
<!--Enter完成提交E-->

</head>


<body onload="startList();">
<form id="Form1" runat="server">
<div class="wrappera">
	<div class="wrapperb">
		<!-- 界面头部 S -->
		<div id="head" class="head">
			<!-- 界面头部 网站LOGO S -->
			<div id="site_logo">
			</div>
			<!-- 界面头部 网站LOGO E -->
			<!-- 界面头部 网站导航栏 S -->
			<div class="site_nav">
				<ul id="nav">
					<li class="nowPaged"><a href="Default.aspx">HOME</a></li>
					<li><a href="#">ABOUT US</a></li>
					<li><a href="action_List.aspx">ACTIONS</a></li>
                    <li class="right" id="Li_Login" runat="server"><a href="admin_Login.aspx">LOGIN</a></li>

					<li class="right" id="Li_Admin" runat="server"><a href="admin_Action_List.aspx">
                        ADMIN</a>
					    <ul>
					        <li>
                                <asp:LinkButton ID="LinkButton3" runat="server" onclick="LinkButton3_Click">LOGOUT</asp:LinkButton></li>
					    </ul>
					</li>
					<li class="right"><a href="#">CONTACT US</a></li>
					<li class="right"><a href="#">PARTNERS</a></li>
				</ul>
			</div>
			<!-- 界面头部 网站导航栏 E -->
		</div>
		<!-- 界面头部 E -->

		<!-- 界面主体部分 S -->
		<div class="mainBody">
			<!-- 界面主体部分 介绍栏 S -->
			<div class="introduction">
				<div class="wordsIntro">
					<div class="wordsWrapper">
					<p><asp:Literal ID="Literal_actionShortIntro" runat="server"></asp:Literal></p>
			
					</div>
				</div>
				<div class="photoIntro">
				                    <asp:Image ID="Image_actionLandScape" runat="server" />
                    <asp:Literal ID="Literal_NoLandScape" runat="server"></asp:Literal>	
				</div>
			</div>
			<!-- 界面主体部分 介绍栏 E -->
			
			<!-- 界面主体部分 细节部分 S -->
			<div class="details">
				<!-- 界面主体部分 细节部分 菜单 S -->
				<div class="menu">
					<div class="menuItem" ><a href="action_Team.aspx?actionId=<%=Helper.getActionIdFromNewsAndLogsId(Convert.ToInt64(Request["newsId"]))%> ">
                        Teams</a></div>
					<div class="menuItem" id="menuItem-actived"><a href="action_newsList.aspx?actionId=<%=Helper.getActionIdFromNewsAndLogsId(Convert.ToInt64(Request["newsId"]))%> ">
                        News</a></div>
					<div class="menuItem" ><a href="action_logsList.aspx?actionId=<%=Helper.getActionIdFromNewsAndLogsId(Convert.ToInt64(Request["newsId"]))%> ">
                        Logs</a></div>
					<div class="menuItem"><a href="action_Team_Gallary.aspx?actionId=<%=Helper.getActionIdFromNewsAndLogsId(Convert.ToInt64(Request["newsId"]))%> ">
                        Gallery</a></div>
				</div>
				<!-- 界面主体部分 细节部分 菜单 E -->
				
				<!-- 界面主体部分 细节部分 内容 S -->
				<div class="contentDetails">
					<div class="contentTitle"><img src="images/news_title.jpg" alt="" /></div>
						<!-- 界面主体部分 细节部分 内容 文章 S -->







						<div class="post">
							<div class="TitleA">
                <asp:Literal ID="Literal_LogsTitle" runat="server"></asp:Literal></div>
							<div class="dateA">
<asp:Literal ID="Literal_Datetime" runat="server"></asp:Literal></div>
					    
                    		
<asp:Literal ID="Literal_LogsContent" runat="server"></asp:Literal>			
						
						
							

						</div>
						<!-- 界面主体部分 细节部分 内容 文章 E -->


						<div class="comments">
							<div class="newComment">
								<div class="userInfo">
								<span class="lab_UserEmail left">User Email:</span>
<asp:TextBox  class="wordsUserEmail left" ID="TextBox_UserEmail"  runat="server"></asp:TextBox>

								    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                        ControlToValidate="TextBox_UserEmail" Display="Dynamic" 
                                        ErrorMessage="Email is required" ForeColor="#CC3300"></asp:RequiredFieldValidator>

								    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="TextBox_UserEmail" Display="Dynamic" 
                                        ErrorMessage="Invalid Email" ForeColor="#CC3300" 
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                        ControlToValidate="TextBox_UserEmail" Display="Dynamic" 
                                        ErrorMessage="Maximum length is 200" ForeColor="#CC3300"
                                        ValidationExpression=".{1,200}"></asp:RegularExpressionValidator>

								</div>
								<div class="columnNewComment">
    <asp:TextBox ID="tb_Leavewords"  runat="server" TextMode="MultiLine"></asp:TextBox>
    </div>
								<ul class="validateFiled">
	                                 <li class="validateA">
<asp:LinkButton class="leavedWordButton" ID="LinkButton_LeaveWords" runat="server" OnClientClick="return validate();" onclick="LinkButton_LeaveWords_Click"></asp:LinkButton></li>
	                                 <li class="validateA">
<img ID="Image_Validate"  src="Handlers/CheckCodeHandler.ashx?action=getImage" />

        <a id="refresh" href="javascript:;"  onclick="updateCheckCode();" >Refresh</a>	</li>
	                                 <li class="validateA"> 

<asp:TextBox ID="Text_CheckCode" runat="server" onblur="javascript:checkCode();"  onkeydown="OnText1Key(event);"></asp:TextBox>
<asp:Label ID="Label_checkCodeMessage" runat="server" Text=""></asp:Label>
<asp:Label ID="span_info" runat="server" Text="">letter are not case-sensitive</asp:Label>
</li>
                                    <li class="error_tips"> 
                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                         ControlToValidate="tb_Leavewords" Display="Dynamic" 
                                         ErrorMessage="Words are required" ForeColor="#CC3300"></asp:RequiredFieldValidator>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                         ControlToValidate="tb_Leavewords" Display="Dynamic" 
                                         ErrorMessage="Maximum length is 255" ForeColor="#CC3300" 
                                            ValidationExpression=".{1,255}"></asp:RegularExpressionValidator>
                                    </li>
                                </ul>
                            </div>




							<div class="commentsList">

                            <asp:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" 
                                    ondatabound="ListView1_DataBound">
                                  
                                <LayoutTemplate>
                                 <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                                </LayoutTemplate>
                                <ItemTemplate>
                            <div class="listB">
									<div class="listUserInfo">
										<span><%#((T_LEAVED_WORDS)Container.DataItem).USER_EMAIL %></span><br/><span><%#((T_LEAVED_WORDS)Container.DataItem).POST_DATETIME.ToString("dd-MM-yyyy hh:mm") %></span>
									</div>
									
									<p><%#((T_LEAVED_WORDS)Container.DataItem).WORDS_CONTENT %></p>
									
								</div>

                                </ItemTemplate>
                            </asp:ListView>

                                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                    SelectMethod="RetrieveWords" 
                                    TypeName="Net.Ntalent.Action50.Core.Service.ReadOnlyService">
                                    <SelectParameters>
                                        <asp:QueryStringParameter DefaultValue="0" Name="newsAndLogsId" 
                                            QueryStringField="newsId" Type="Int64" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>

<div class="turnPage right">
<asp:DataPager PagedControlID="ListView1" ID="DataPager1" runat="server" PageSize="10">
    <Fields>
        <asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="false" ShowLastPageButton="false"
            ShowFirstPageButton="true"  FirstPageText="First" RenderNonBreakingSpacesBetweenControls="false"
            ShowPreviousPageButton="true" PreviousPageText="&lt; Previous" ButtonCssClass="linkB left"
             /> 

        <asp:NumericPagerField  ButtonType=Link CurrentPageLabelCssClass="linkC left" NumericButtonCssClass="linkC left" RenderNonBreakingSpacesBetweenControls="false" ButtonCount=10/>

        <asp:NextPreviousPagerField ButtonType="Link"  ButtonCssClass="linkB left" ShowFirstPageButton="false" ShowPreviousPageButton="false"
            ShowNextPageButton="true" NextPageText="Next &gt;"  RenderNonBreakingSpacesBetweenControls="false" 
            ShowLastPageButton="true"  LastPageText="Last"/>
    </Fields>
</asp:DataPager>
</div>


								
	
							</div>
						</div>
					</div>
				<!-- 界面主体部分 细节部分 内容 E -->
			</div>
			<!-- 界面主体部分 细节部分 E -->
		</div>
		<!-- 界面主体部分 E -->
		
		<!-- 界面尾部 S -->
		<div id="footer" class="footer">
		</div>
		<!-- 界面尾部 E -->
	</div>
</div>

</form>
</body>
</html>
